/* 
 * BusiAcctService.java  
 * 
 * version 1.0
 *
 * 2015年8月31日 
 * 
 * Copyright (c) 2015,zlebank.All rights reserved.
 * 
 */
package com.paytong.platform.acc.service;

import com.paytong.platform.acc.bean.BusiAcct;
import com.paytong.platform.acc.bean.QueryBusiCodeInfo;
import com.paytong.platform.acc.bean.enums.Usage;
import com.paytong.platform.acc.exception.AbstractBusiAcctException;
import com.paytong.platform.member.commons.service.impl.BusinessActor;

/**
 * Class Description
 *
 * @author yangying
 * @version
 * @date 2015年8月31日 下午1:53:54
 * @since
 */
public interface BusiAcctService { 
    /**
     * 开通业务账户
     * @param busiActor
     * @param busiAcct
     * @param userId
     * @return
     * @throws AbstractBusiAcctException
     *             if the business account generated by given param is exist
     */
    String openBusiAcct(BusinessActor busiActor, BusiAcct busiAcct, long userId)
            throws AbstractBusiAcctException;
    /**
     * 通过业务的账户号得到业务账号
     * @param acctCode
     * @return
     * @throws AbstractBusiAcctException
     *             if not exist
     */
    BusiAcct getByBusiAcctCode(String BusiAcctCode)
            throws AbstractBusiAcctException;
    /**
     * 通过 会员ID 标识得到科目代码
     * @param usage
     * @param memberId
     * @return account code
     * @throws AbstractBusiAcctException
     *             If business account is not exist 
     */
    /*String getAccount(Usage usage, String memberId)
            throws AbstractBusiAcctException;*/
    /**
     * 通过 会员ID 标识得到科目代码的ID
     * @param usage
     * @param memberId
     * @return account code
     * @throws AbstractBusiAcctException
     *             If business account is not exist 
     */
    long getAccountId(Usage usage, String memberId) throws AbstractBusiAcctException;
    
    /**
     * 通过 会员ID 和 用途 得到 业务账户
     * @param usage
     * @param memberId
     * @return account code
     * @throws AbstractBusiAcctException
     *             If business account is not exist 
     */
    QueryBusiCodeInfo getBusiCodeByMemberId(Usage usage, String memberId) throws AbstractBusiAcctException;
}
